Dynomotion

Group: DynoMotion Message: 5354 From: David TAylor Date: 6/27/2012
Subject: MODBUS RS485
What is the best method to set up a connection to a slave board using RS485.

The slave board with a RS485 port. What pins would I use on the kflop to connectt to the RS485 on the slave board.? Where would I get some sample source to access the RS485 on the kflop?
Thanks.
David Taylor
Group: DynoMotion Message: 5355 From: Tom Kerekes Date: 6/27/2012
Subject: Re: MODBUS RS485
Hi David,
 
KFLOP doesn't have an RS485 port.   It has a 3.3V LVTTL UART capable of up to 57600 baud.  It would require a converter.  Kanalog has a UART to RS232 converter.  See:
 
 
The example C code shown is somewhat obsolete.  Originally there was a single bit that enabled Kanalog and the RS232 UART.  There are now 2 independent bits so the UART can be used with/without Kanalog.  So now set bit 1 instead of bit 0 to enable the UART
 
FPGA(KAN_TRIG_REG) = 2; // enable to get RS232 working
 
But additionally these low level routines have been superseded by buffered routines which will do the initialization.  See the example:
 
C:\KMotion429\C Programs\RS232\BufferedRS232.c
 
You might also checkout these recent Threads.
 
 
 
What device are you trying to communicate with?
 
Regards
TK